#
# @lc app=leetcode.cn id=1 lang=python3
#
# [1] 两数之和
#

# @lc code=start
class Solution:
    def twoSum(self, nums: List[int], target: int) -> List[int]:
        map = {}
        for index, num in enumerate(nums):
            map[num] = index
        for i, num in enumerate(nums):
            j = map.get(target - num)
            if j is not None and i != j:
                return [i, j]
        return []


# @lc code=end
